package com.helei.cloud.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

import javax.annotation.Resource;

/**
 * @author helei
 * @description nacosController
 * @date 2020/11/9 9:37
 */
@RestController
public class nacosController {
    @Resource
    private RestTemplate restTemplate;
    @Value("${service-url.nacos-user-service}")
    private String url;

    @GetMapping(value = "aa")
    public String aa() {
        return restTemplate.getForObject(url + "/aa",String.class);
    }
}
